local jujian = fk.CreateSkill{
    name = "ld__jujian",
    tags = { Skill.DeputyPlace,Skill.Compulsory },
}

local H = require "packages.ol_hegemony.util"

jujian:addEffect(fk.EnterDying,{
    anim_type = "defensive",
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(jujian.name) and H.compareKingdomWith(player, target) and target.dying
      end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        if not target.dead then
          room:recover({
            who = target,
            num = math.min(1, target.maxHp) - target.hp,
            recoverBy = player,
            skillName = jujian.name,
          })
          room:setPlayerMark(player,"@@ld__jujian_change_before",1)
          H.transformGeneral(player, false, 3, false)
        end
      end,
})

Fk:loadTranslationTable{
    ["ld__jujian"] = "举荐",
    [":ld__jujian"] = "副将技，锁定技，此武将牌上单独的阴阳鱼个数-1。当与你势力相同的角色进入濒死阶段时，你令其将体力回复至1点，然后你<a href='heg_transform_general'>变更副将</a>。",

    ["@@ld__jujian_change_before"]="举荐 已变更",

    ["$ld__jujian1"] = "得此贤士，如鱼得水。",
    ["$ld__jujian2"] = "将军，在下可举荐一人。",
}

return jujian